fs/zfs: Check if returned pointer for allocated memory is NULL
authorLidong Chen <lidong.chen@oracle.com>
Wed, 22 Jan 2025 07:17:01 +0000 (07:17 +0000)
committerFelix Zielcke <fzielcke@z-51.de>
Thu, 3 Jul 2025 16:35:51 +0000 (18:35 +0200)
commitabe61f458ca06b252d2f74b62856a7692dfb9a58
tree91d44f05d3364dd144878e083b970d3f43978463
parentbbf812f418933c0706464a7a2652b99fc54ef638
fs/zfs: Check if returned pointer for allocated memory is NULL

When using grub_malloc() or grub_zalloc(), these functions can fail if
we are out of memory. After allocating memory we should check if these
functions returned NULL and handle this error if they did.

Signed-off-by: Lidong Chen <lidong.chen@oracle.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
Gbp-Pq: Topic cve-2025-jan
Gbp-Pq: Name fs-zfs-Check-if-returned-pointer-for-allocated-memory-is-.patch
grub-core/fs/zfs/zfs.c